import { S } from '../../s';
import { IPSAppCodeList } from '../../app/codelist/ipsapp-code-list';
import { PSEditorImpl } from '../pseditor-impl';
import { IPSCodeListEditor } from './ipscode-list-editor';

export class PSCodeListEditorImpl
  extends PSEditorImpl
  implements IPSCodeListEditor
{
  protected psappcodelist: IPSAppCodeList;
  getPSAppCodeList(): IPSAppCodeList | null {
    return (
      this.psappcodelist ||
      (this.psappcodelist = this.fillObjectModel(
        S._8,
        this.M.getPSAppCodeList,
        S._2a2,
      ) as IPSAppCodeList)
    );
  }

  get array(): boolean {
    return this.M.array != null ? this.M.array : false;
  }
  get cls(): string {
    return 'PSCodeListEditorImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._130) return true;
    return super.instanceof(cls);
  }
}
